package edu.sysu.cshare.gui;

import java.awt.BorderLayout;

import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;

import edu.sysu.cshare.control.HomeworkManager;
import edu.sysu.cshare.util.gui.Table_Homework;
import edu.sysu.cshare.util.gui.TableModel_Homework_Subed;

public class Pnl_Homework_Subed extends JPanel {

		/**
		 * Create the panel.
		 */
		public Pnl_Homework_Subed(HomeworkManager hm) {
			Table_Homework table  = new Table_Homework(new TableModel_Homework_Subed(hm),hm);
			table.setFillsViewportHeight(true);
			table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
			JScrollPane scrollPane = new JScrollPane(table);
			this.setLayout(new BorderLayout());
			add(scrollPane,BorderLayout.CENTER);

		}

	}